@@ -1,8 +1,8 @@ |
||
| 1 | 1 |
require 'spec_helper' |
| 2 | 2 |
|
| 3 | 3 |
describe Agents::GoogleCalendarPublishAgent, :vcr do |
| 4 |
- before do |
|
| 5 |
- @valid_params = {
|
|
| 4 |
+ before do |
|
| 5 |
+ @valid_params = {
|
|
| 6 | 6 |
'expected_update_period_in_days' => "10", |
| 7 | 7 |
'calendar_id' => 'sqv39gj35tc837gdns1g4d81cg@group.calendar.google.com', |
| 8 | 8 |
'google' => {
|
@@ -11,28 +11,28 @@ describe Agents::GoogleCalendarPublishAgent, :vcr do |
||
| 11 | 11 |
'service_account_email' => '1029936966326-ncjd7776pcspc98hsg82gsb56t3217ef@developer.gserviceaccount.com' |
| 12 | 12 |
} |
| 13 | 13 |
} |
| 14 |
- @checker = Agents::GoogleCalendarPublishAgent.new(:name => "somename", :options => @valid_params) |
|
| 15 |
- @checker.user = users(:jane) |
|
| 16 |
- @checker.save! |
|
| 17 |
- end |
|
| 14 |
+ @checker = Agents::GoogleCalendarPublishAgent.new(:name => "somename", :options => @valid_params) |
|
| 15 |
+ @checker.user = users(:jane) |
|
| 16 |
+ @checker.save! |
|
| 17 |
+ end |
|
| 18 | 18 |
|
| 19 | 19 |
describe '#receive' do |
| 20 | 20 |
it 'should publish any payload it receives' do |
| 21 | 21 |
event1 = Event.new |
| 22 | 22 |
event1.agent = agents(:bob_manual_event_agent) |
| 23 | 23 |
event1.payload = {
|
| 24 |
- 'message' => {
|
|
| 25 |
- 'visibility' => 'default', |
|
| 26 |
- 'summary' => "Awesome event", |
|
| 27 |
- 'description' => "An example event with text. Pro tip: DateTimes are in RFC3339", |
|
| 28 |
- 'end' => {
|
|
| 29 |
- 'dateTime' => '2014-10-02T11:00:00-05:00' |
|
| 30 |
- }, |
|
| 31 |
- 'start' => {
|
|
| 32 |
- 'dateTime' => '2014-10-02T10:00:00-05:00' |
|
| 33 |
- } |
|
| 34 |
- } |
|
| 35 |
- } |
|
| 24 |
+ 'message' => {
|
|
| 25 |
+ 'visibility' => 'default', |
|
| 26 |
+ 'summary' => "Awesome event", |
|
| 27 |
+ 'description' => "An example event with text. Pro tip: DateTimes are in RFC3339", |
|
| 28 |
+ 'end' => {
|
|
| 29 |
+ 'dateTime' => '2014-10-02T11:00:00-05:00' |
|
| 30 |
+ }, |
|
| 31 |
+ 'start' => {
|
|
| 32 |
+ 'dateTime' => '2014-10-02T10:00:00-05:00' |
|
| 33 |
+ } |
|
| 34 |
+ } |
|
| 35 |
+ } |
|
| 36 | 36 |
event1.save! |
| 37 | 37 |
|
| 38 | 38 |
@checker.receive([event1]) |